#!/usr/bin/python3
a="qweqw& gt;"
print(a.replace("& gt;","&gt;").replace("'","\\'"))